package com.dfbz.demo05_枚举与反射;

import com.dfbz.demo04_Enum类.Season;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01 {

    public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
        Class<Season> seasonClass = Season.class;

        Constructor<Season> constructor = seasonClass.getDeclaredConstructor();
        constructor.setAccessible(true);

        Season season = constructor.newInstance();
        System.out.println(season);
    }
}
